package top.zackyoung.bbs.entity;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

@Data
@JsonIgnoreProperties
@Document(indexName = "article_list", type = "jdbc",createIndex = false)
public class ArticleList {

    @Id
    private Long id;

    @Field(type = FieldType.Keyword)
    @JsonProperty("article_id")
    private String articleId;

    @Field(type = FieldType.Keyword)
    @JsonProperty("user_name")
    private String userName;

    @Field(type = FieldType.Text)
    private String title;

    @Field(type = FieldType.Text,analyzer = "ik_max_word")
    private String content;

    @Field(type = FieldType.Text)
    @JsonProperty("create_time")
    private String createTime;

    @Field(type = FieldType.Keyword)
    @JsonProperty("tag_id")
    private Integer  tagId;

}
